package com.ruoyi.jcsj.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.jcsj.mapper.TIpassSchoolMapper;
import com.ruoyi.jcsj.domain.TIpassSchool;
import com.ruoyi.jcsj.service.ITIpassSchoolService;

/**
 * 一卡通校园配置Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-04-10
 */
@Service
public class TIpassSchoolServiceImpl implements ITIpassSchoolService 
{
    @Autowired
    private TIpassSchoolMapper tIpassSchoolMapper;

    /**
     * 查询一卡通校园配置
     * 
     * @param id 一卡通校园配置主键
     * @return 一卡通校园配置
     */
    @Override
    public TIpassSchool selectTIpassSchoolById(Long id)
    {
        return tIpassSchoolMapper.selectTIpassSchoolById(id);
    }

    /**
     * 查询一卡通校园配置列表
     * 
     * @param tIpassSchool 一卡通校园配置
     * @return 一卡通校园配置
     */
    @Override
    public List<TIpassSchool> selectTIpassSchoolList(TIpassSchool tIpassSchool)
    {
        return tIpassSchoolMapper.selectTIpassSchoolList(tIpassSchool);
    }

    /**
     * 新增一卡通校园配置
     * 
     * @param tIpassSchool 一卡通校园配置
     * @return 结果
     */
    @Override
    public int insertTIpassSchool(TIpassSchool tIpassSchool)
    {
        tIpassSchool.setCreateTime(DateUtils.getNowDate());
        return tIpassSchoolMapper.insertTIpassSchool(tIpassSchool);
    }

    /**
     * 修改一卡通校园配置
     * 
     * @param tIpassSchool 一卡通校园配置
     * @return 结果
     */
    @Override
    public int updateTIpassSchool(TIpassSchool tIpassSchool)
    {
        return tIpassSchoolMapper.updateTIpassSchool(tIpassSchool);
    }

    /**
     * 批量删除一卡通校园配置
     * 
     * @param ids 需要删除的一卡通校园配置主键
     * @return 结果
     */
    @Override
    public int deleteTIpassSchoolByIds(Long[] ids)
    {
        return tIpassSchoolMapper.deleteTIpassSchoolByIds(ids);
    }

    /**
     * 删除一卡通校园配置信息
     * 
     * @param id 一卡通校园配置主键
     * @return 结果
     */
    @Override
    public int deleteTIpassSchoolById(Long id)
    {
        return tIpassSchoolMapper.deleteTIpassSchoolById(id);
    }
}
